<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class AddChineseFields extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::table('articles', function (Blueprint $table) {
            $table->string('cn_title', 255)->after('title')->nullable();
            $table->string('cn_author_list', 1000)->after('author_list')->nullable();
            $table->text('cn_affiliation')->after('affiliation')->nullable();
            $table->text('cn_abstract')->after('abstract')->nullable();
            $table->text('cn_keywords', 1000)->after('keywords')->nullable();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::table('articles', function (Blueprint $table) {
            $table->dropColumn('cn_title');
            $table->dropColumn('cn_author_list');
            $table->dropColumn('cn_affiliation');
            $table->dropColumn('cn_abstract');
            $table->dropColumn('cn_keywords');
        });
    }
}
